import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login/login.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: login
  },
  {
    path: '/login', //登录页
    name: 'login',
    component: () => import('../views/login/login.vue'),
  },
  {
    path: '/register', //注册页
    name: 'register',
    component: () => import('../views/login/register.vue')
  },
  {
    path: '/codeLogin', //二维码登录
    name: 'codeLogin',
    component: () => import('../views/login/codeLogin.vue')
  },
  {
    path: '/latecomer', //late介绍
    name: 'latecomer',
    component: () => import('../views/login/latecomer.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home.vue')
  },
  {
    path: '/createAds',
    name: 'createAds',
    component: () => import('../views/form/createAds.vue')
  },
  {
    path: '/console',
    name: 'console',
    component: () => import('../views/console.vue')
  }, {
    path: '/userInfo',
    name: 'userInfo',
    component: () => import('../views/form/userInfo.vue')
  },
  {
    path: '/security',
    name: 'security',
    component: () => import('../views/form/security.vue')
  },
  {
    path: '/imgUpload',
    name: 'imgUpload',
    component: () => import('../views/form/imgUpload.vue')
  },
  {
    path: '/tabList',
    name: 'tabList',
    component: () => import('../components/tableList.vue')
  },
  {
    path: '/drawMoney',
    name: 'drawMoney',
    component: () => import('../views/form/drawMoney.vue')
  },
]



const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
